﻿// ***********************************************************************
// Assembly         : Zf3DPlatform
// Author           : tianteng
// Created          : 12-11-2017
//
// Last Modified By : tianteng
// Last Modified On : 12-11-2017
// ***********************************************************************
// <copyright file="Zf3DPlatformApp.cs" company="">
//     Copyright ©  2017
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Windows.Forms;
using DevExpress.XtraBars;
using DevExpress.XtraBars.Ribbon;
using OSS.Earth.Properties;
using Zf3DPlatform.osgEarth.Commands.AnimationCmds;
using Zf3DPlatform.osgEarth.Commands.MeasuringToolsCmds;
using Zf3DPlatform.osgEarth.Commands.ViewCmds;
using OSS.Earth.Commands.HelpCmds;
using OSS.Earth.Commands.ImportExportCmds;
using OSS.Earth.Commands.ModelCmds;
using OSS.Earth.Commands.TestCmds;
using OSS.Earth.Commands.UserTestCmds;
using OSS.Earth.ToolCmds;
using ZFGK.Addins;
using ZfPlatform.DevExpressGUI;
using ZfWebEarth;
using ZFGK.OSG.UI.Commands;
using ZFGK.osgEarth.UI;
using ZFGK.osgEarth.UI.Commands;
using ZFGK.osgEarth.UI.Commands.DigitalEarthCmds;
using ZFGK.DevExprss.Utility;
using ZFGK.osgEarth.PlatformGUI.Commands.ImageLayerCmds;
using ZFGK.osgEarth.PlatformGUI.Commands.ViewCmds;
using ZFGK.osgEarth.PlatformGUI.osgEarth.Commands.ToolCmds;
using ZFGK.osgEarth.PlatformGUI.Utility;
using ZFGK.osgEarth.UI.Commands.ModelCmds;
using ZFGK.osgEarth.Web;
using ZFGK.Utility;
using ModelDeleteCmd = OSS.Earth.Commands.ModelCmds.ModelDeleteCmd;

namespace OSS.Earth
{
    /// <summary>
    /// Class Zf3DPlatformApp.
    /// </summary>
    /// <seealso cref="IExtendApp" />
    public class Zf3DPlatformApp : IExtendApp
    {
        public static MainRibbonForm mainRibbonForm = null;
        /// <summary>
        /// Starts up.
        /// </summary>
        /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
        public bool StartUp(ExtendAppData data)
        {
            Zf3DViewpointUIUtil.BindUI();

            mainRibbonForm = data.MainForm as MainRibbonForm;
            mainRibbonForm.Icon = Resources.network_earth;
            mainRibbonForm.Text = "智帆智慧地球(ZZEarth)";
            mainRibbonForm.siAbout.Caption = "北京智帆高科科技有限公司 QQ群:621874650";
            InitRibbon(mainRibbonForm.ribbonControl);

            var osgEarthForm = new OsgEarthViewForm();
            osgEarthForm.Icon = Resources.network_earth;
            osgEarthForm.Text = "数字地球";
            osgEarthForm.WindowState = FormWindowState.Maximized;

            var googleEarthElevationeLayer = OeWebLayerUtil.CreateGoogleEarthElevationeLayer();
            googleEarthElevationeLayer.Name = "GoogleEarthElevationeLayer";
            osgEarthForm.OsgEarthViewCtrl.OsgEarthObj.MapNode.getMap().addLayer(googleEarthElevationeLayer);

            mainRibbonForm.Load += delegate(object sender, EventArgs args)
            {
                AddinManager.AddinService.TryRunCmd("ShowCurUserGroupTreeNode");

                //             UserUtil. += delegate(tb_User user)
                //             {
                //                 var ribbonPageGroup = mainRibbonForm.ribbonControl
                //                     .Page("帮助").Group("当前用户");
                // 
                //                 var barUserName = ribbonPageGroup.GetBarItem("用户名称");
                //                 barUserName.Caption = user == null ? "用户名称" : "用户名称:" + user.UserName;
                //                 var barPermissionType = ribbonPageGroup.GetBarItem("用户权限");
                //                 barPermissionType.Caption = user == null ? "用户权限" : "用户权限:" + CurUser.PermissionToString(user.PermissionType);
                //                 var barTrialExpirationDate = ribbonPageGroup.GetBarItem("授权期限");
                //                 barTrialExpirationDate.Caption = user == null ? "授权期限" : "授权期限:" + user.ExpirationDate;
                //             };

                // 显示谷歌印象和路网
                AddinManager.AddinService.TryRunCmd(new CmdInfo(typeof(UpdateImageLayerCmd), SatelliteImageType.GOOGLE_EARTH_TILE));
                AddinManager.AddinService.TryRunCmd(new CmdInfo(typeof(HideOrShowLuWangCmd), null));
            };
            return true;
        }

        /// <summary>
        /// Adds the user menu.
        /// </summary>
        /// <param name="ribbonControl">The ribbon control.</param>
        public static void InitRibbon(RibbonControl ribbonControl)
        {
            var addinService = AddinManager.AddinService;

            addinService.RegisterCmd<FlyToCmd>();
            addinService.RegisterCmd<HighlightCancelCmd>("HighlightCancel");
            addinService.RegisterCmd<WeiZhiHuiZhengCmd>("WeiZhiHuiZheng");
            // 快捷按钮
            ribbonControl.Toolbar.ItemLinks
                .NewButton("飞往", false, btn => btn.Tag = ("FlyTo"), btn => btn.SetImage(Resources.paper_plane_icon, false)
                    , btn => btn.Hint = ("飞往记录的视点"))
                .NewButton("取消高亮", false, btn => btn.Tag = ("HighlightCancel"), btn => btn.SetImage(Resources.cancel, false)
                    , btn => btn.Hint = ("取消所有模型的高亮"))
                .NewButton("位置回正", false, btn => btn.Tag = ("WeiZhiHuiZheng"), btn => btn.SetImage(Resources.compass, false)
                    , btn => btn.Hint = ("以顶视图查看位置"));

            // 程序
            var group = ribbonControl.Page("程序").Group("显示");
            var popupMenu = new PopupMenu();
            popupMenu.Ribbon = ribbonControl;

            addinService.RegisterCmd<FlyToViewPointShowCmd>("FlyToViewPointShow");
            addinService.RegisterCmd<ViewScreenshotCmd>("ViewScreenshot");
            popupMenu.NewButton("视点记录", false, btn => btn.Tag = ("FlyToViewPointShow"), btn => btn.SetImage(Resources.paper_plane_icon, true));
            group.ItemLinks
                .NewButton("飞往", false, btn => btn.Tag = ("FlyTo"), btn => btn.SetImage(Resources.paper_plane_icon, true)
                    , btn => btn.ButtonStyle = (BarButtonStyle.DropDown), btn => btn.DropDownControl = (popupMenu));
            group.ItemLinks
                .NewButton("取消高亮", false,
                    btn => btn.Tag = ("HighlightCancel"), btn => btn.SetImage(Resources.cancel, false)
                    , btn => btn.Hint = ("取消所有模型的高亮"))
                .NewButton("位置回正", false,
                    btn => btn.Tag = ("WeiZhiHuiZheng"), btn => btn.SetImage(Resources.compass, false)
                    , btn => btn.Hint = ("以顶视图查看位置"))
                .NewButton("视图截屏", false, btn => btn.Tag = ("ViewScreenshot"), btn => btn.SetImage(Resources.截图, false)
                    , btn => btn.Hint = ("截取当前程序的视图"));

            addinService.RegisterCmd<AnimationViewPointShowCmd>("AnimationViewPointShow");
            addinService.RegisterCmd<AnimationRunCmd>("AnimationRun");
            ribbonControl.Page("程序").Group("动画").ItemLinks
                .NewButton("视点管理", false, btn => btn.Tag = ("AnimationViewPointShow"), btn => btn.SetImage(Resources.footprint, false))
                .NewButton("运行动画", false, btn => btn.Tag = ("AnimationRun"), btn => btn.SetImage(Resources.animation, false))
                .NewButton("录制动画", false, btn => btn.Tag = ("AnimationRun"),
                    btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false));

            addinService.RegisterCmd<AddImageLayerCmd>("AddImageLayer");
            addinService.RegisterCmd<AddElevationLayerCmd>("AddElevationLayer");
            addinService.RegisterCmd<UpdateImageLayerCmd>("UpdateImageLayer");
            addinService.RegisterCmd<HideOrShowLuWangCmd>("HideOrShowLuWang");
            ribbonControl.Page("程序").Group("图层").ItemLinks
                .NewLinkContainer("卫星影像", false, btn => btn.SetImage(Resources.satellite, true));
            var barButtonGroup = ribbonControl.Page("程序").Group("图层").ItemLinks.GetBarItem("卫星影像") as BarLinkContainerItem;
            barButtonGroup.ItemLinks
                .NewCheck(SatelliteImageType.GOOGLE_EARTH_TILE.ToString(), "GoogleEarth", false, btn => btn.Tag = (new CmdInfo("UpdateImageLayer", SatelliteImageType.GOOGLE_EARTH_TILE)),
                    btn => btn.Checked = (true))
                .NewCheck(SatelliteImageType.GOOGLE_ChinaSatelliteMap_TILE.ToString(), "GoogleMapChina(有偏)", false, btn => btn.Tag = (new CmdInfo("UpdateImageLayer", SatelliteImageType.GOOGLE_ChinaSatelliteMap_TILE)))
                .NewCheck(SatelliteImageType.BING_SatelliteMap_TILE.ToString(), "BingChina", false, btn => btn.Tag = (new CmdInfo("UpdateImageLayer", SatelliteImageType.BING_SatelliteMap_TILE)))
                .NewCheck(SatelliteImageType.TIANDITU_MAP_TILE.ToString(), "天地图", false, btn => btn.Tag = (new CmdInfo("UpdateImageLayer", SatelliteImageType.TIANDITU_MAP_TILE)));           
            ribbonControl.Page("程序").Group("图层").ItemLinks
                .NewCheck("显示隐藏路网", false, btn => btn.Tag = ("HideOrShowLuWang"), btn => btn.SetImage(Resources.maps, true), btn => btn.Checked = false);

            addinService.RegisterCmd<WebDataCacheCmd>("WebDataCache");
            ribbonControl.Page("程序").Group("图层").ItemLinks
                .NewButton("缓存数据", false, btn => btn.Tag = ("WebDataCache"), btn => btn.SetImage(Resources.Downloads));

            addinService.RegisterCmd<MeasuringDistanceCmd>("MeasuringDistance");
            addinService.RegisterCmd<MeasuringAreaCmd>("MeasuringArea");
            addinService.RegisterCmd<BoundBoxInfoCmd>("BoundBoxInfo");
            ribbonControl.Page("程序").Group("测量").ItemLinks
                .NewButton("距离", false, btn => btn.Tag = ("MeasuringDistance"), btn => btn.SetImage(Resources.MeasuringDistance, false))
                .NewButton("面积", false, btn => btn.Tag = ("MeasuringArea"), btn => btn.SetImage(Resources.MeasuringArea, false))
                .NewButton("模型大小", false, btn => btn.Tag = ("BoundBoxInfo"), btn => btn.SetImage(Resources.sizes, false));

            addinService.RegisterCmd<QueryLocationCmd>("QueryLocation");
            ribbonControl.Page("程序").Group("查询").ItemLinks
                .NewButton("位置查询", false, btn => btn.Tag = ("QueryLocation"), btn => btn.SetImage(Resources.loaction, true));

            addinService.RegisterCmd<ModelCacheClearCmd>("ModelCacheClear");
            ribbonControl.Page("程序").Group("模型").ItemLinks
                .NewButton("清除模型缓存", false, btn => btn.Tag = ("ModelCacheClear"), btn => btn.SetImage(Resources.火箭, true));

            addinService.RegisterCmd<ShowOsgViewFormCmd>("ShowOsgViewForm");
            addinService.RegisterCmd<OsgFileConvertCmd>("NodeFileConvert");
            ribbonControl.Page("程序").Group("工具").ItemLinks
                .NewButton("OSG查看器", false, btn => btn.Tag = ("ShowOsgViewForm"), btn => btn.SetImage(Resources._3d_modelling, true))
                .NewButton("格式转换", false, btn => btn.Tag = ("OsgFileConvert"), btn => btn.SetImage(Resources.transfer_24, true));

            addinService.RegisterCmd<ImportCadLineCmd>("ImportCadLine");
            ribbonControl.Page("程序").Group("绘制").ItemLinks
                .NewButton("导入CAD线条", false, btn => btn.Tag = ("ImportCadLine"), btn => btn.SetImage(Resources.autocad, true));

            addinService.RegisterCmd<ChangeTimeCmd>("ChangeTime");
            addinService.RegisterCmd<OpenAppConfigPathCmd>("OpenAppConfigPath");
            ribbonControl.Page("程序").Group("配置").ItemLinks
                .NewButton("修改时间", false, btn => btn.Tag = ("ChangeTime"), btn => btn.SetImage(Resources.calendar_clock, true))
                .NewButton("打开配置路径", false, btn => btn.Tag = ("OpenAppConfigPath"), btn => btn.SetImage(Resources.config, true));
// 
//             addinService.RegisterCmd<ShowCurUserGroupTreeNodeCmd>("ShowCurUserGroupTreeNode");
//             ribbonControl.Page("用户模型").Group("当前信息").ItemLinks
//                 .NewStatic("当前项目", "当前项目", false)
//                 .NewStatic("当前分组", "当前分组", false)
//                 .NewButton("显示当前", false, btn => btn.Tag = ("ShowCurUserGroupTreeNode"), btn => btn.SetImage(Resources.分组, false));
// 
//             addinService.RegisterCmd<ProjectAddCmd>("ProjectAdd");
//             addinService.RegisterCmd<ProjectEditCmd>("ProjectEdit");
//             addinService.RegisterCmd<ProjectDeleteCmd>("ProjectDelete");
//             addinService.RegisterCmd<SetUserProjectCmd>("SetUserProject");
//             ribbonControl.Page("用户模型").Group("项目").ItemLinks
//                 .NewButton("添加", false, btn => btn.Tag = ("ProjectAdd"), btn => btn.SetImage(Resources.项目添加, false))
//                 .NewButton("编辑", false, btn => btn.Tag = ("ProjectEdit"), btn => btn.SetImage(Resources.项目编辑, false))
//                 .NewButton("删除", false, btn => btn.Tag = ("ProjectDelete"), btn => btn.SetImage(Resources.项目删除, false));
// 
//             addinService.RegisterCmd<GroupAddCmd>("GroupAdd");
//             addinService.RegisterCmd<GroupEditCmd>("GroupEdit");
//             addinService.RegisterCmd<GroupDeleteCmd>("GroupDelete");
//             addinService.RegisterCmd<SetUserGroupCmd>("SetUserGroup");
//             ribbonControl.Page("用户模型").Group("组").ItemLinks
//                 .NewButton("添加", false, btn => btn.Tag = ("GroupAdd"), btn => btn.SetImage(Resources.分组添加, false))
//                 .NewButton("编辑", false, btn => btn.Tag = ("GroupEdit"), btn => btn.SetImage(Resources.分组编辑, false))
//                 .NewButton("删除", false, btn => btn.Tag = ("GroupDelete"), btn => btn.SetImage(Resources.分组删除, false));
// 
//             addinService.RegisterCmd<GroupModeAddlCmd>("GroupModeAdd");
//             addinService.RegisterCmd<GroupModeImportlCmd>("GroupModeImport");
//             addinService.RegisterCmd<GroupModelMoveCmd>("GroupModelMove");
//             addinService.RegisterCmd<GroupModelRotateCmd>("GroupModelRotate");
//             addinService.RegisterCmd<GroupModelEditCmd>("GroupModelEdit");
//             addinService.RegisterCmd<GroupModelDeleteCmd>("GroupModelDelete");
//             addinService.RegisterCmd<GroupModelShowCmd>("GroupModelShow");
//             addinService.RegisterCmd<GroupModelLocationCmd>("GroupModelLocation");
//             ribbonControl.Page("用户模型").Group("点模型").ItemLinks
//                 .NewButton("添加", false, btn => btn.Tag = ("GroupModeAdd"), btn => btn.SetImage(Resources.模型添加, false))
//                 .NewButton("导入", false, btn => btn.Tag = ("GroupModeImport"), btn => btn.SetImage(Resources.import, false))
//                 .NewButton("移动", false, btn => btn.Tag = ("GroupModelMove"), btn => btn.SetImage(Resources.模型移动, false))
//                 .NewButton("旋转", false, btn => btn.Tag = ("GroupModelRotate"), btn => btn.SetImage(Resources.模型旋转, false))
//                 .NewButton("编辑", false, btn => btn.Tag = ("GroupModelEdit"), btn => btn.SetImage(Resources.模型编辑, false))
//                 .NewButton("删除", false, btn => btn.Tag = ("GroupModelDelete"), btn => btn.SetImage(Resources.模型删除, false));
// 
//             addinService.RegisterCmd<GroupLineModeAddlCmd>("GroupLineModeAdd");
//             ribbonControl.Page("用户模型").Group("线模型").ItemLinks
//                 .NewButton("添加", false, btn => btn.Tag = ("GroupLineModeAdd"), btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false))
//                 .NewButton("编辑", false, btn => btn.Tag = ("GroupLineModeAdd"), btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false))
//                 .NewButton("删除", false, btn => btn.Tag = ("GroupLineModeAdd"), btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false));
//             ribbonControl.Page("用户模型").Group("面模型").ItemLinks
//                 .NewButton("添加", false, btn => btn.Tag = ("GroupLineModeAdd"), btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false))
//                 .NewButton("编辑", false, btn => btn.Tag = ("GroupLineModeAdd"), btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false))
//                 .NewButton("删除", false, btn => btn.Tag = ("GroupLineModeAdd"), btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false));
// 
//             addinService.RegisterCmd<ImportRevitDataCmd>("ImportRevitData");
//             addinService.RegisterCmd<ImportBentleyDataCmd>("ImportBentleyData");
//             ribbonControl.Page("用户模型").Group("接口").ItemLinks
//                 .NewButton("导入Revit数据", false, btn => btn.Tag = ("ImportRevitData"), btn => btn.SetImage(Resources.revit, true))
//                 .NewButton("导入Bentley数据", false, btn => btn.Tag = ("ImportBentleyData"), btn => btn.SetImage(Resources.Bentley, true));
//             ribbonControl.Page("用户模型").Group("模型属性").ItemLinks
//                 .NewButton("编辑", false, btn => btn.Tag = ("GroupModelEdit"), btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false))
//                 .NewButton("导入", false, btn => btn.Tag = ("GroupModelEdit"), btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false))
//                 .NewButton("导出", false, btn => btn.Tag = ("GroupModelEdit"), btn => btn.SetImage(Resources.wait_red, false), btn => btn.Enabled = (false));

            addinService.RegisterCmd<ModelAddCmd>("ModelAdd");
            addinService.RegisterCmd<ModelMoveCmd>("ModelMove");
            addinService.RegisterCmd<ModelDeleteCmd>("ModelDelete");
            //             ribbonControl.Page("模型").Group("模型")
            //                 .NewButton("添加", false, btn => btn.Tag = ("ModelAdd"), btn => btn.SetImage(Resources.browser, false))
            //                 .NewButton("移动", false, btn => btn.Tag = ("ModelMove"), btn => btn.SetImage(Resources.browser, false))
            //                 .NewButton("删除", false, btn => btn.Tag = ("ModelDelete"), btn => btn.SetImage(Resources.browser, false));
            
            
            addinService.RegisterCmd<VersionLogShowCmd>("VersionLogShow");
            addinService.RegisterCmd<ProjectPlanningCmd>("ProjectPlanning");
            addinService.RegisterCmd<AboutShowCmd>("AboutShow");
            ribbonControl.Page("帮助").Group("帮助").ItemLinks
                .NewButton("更新日志", false, btn => btn.Tag = ("VersionLogShow"), btn => btn.SetImage(Resources.更新日志, true))
                //.NewButton("帮助文档", false, btn => btn.Tag = ("HelpShow"), btn => btn.SetImage(Resources.browser, false))
                .NewButton("软件规划", false, btn => btn.Tag = ("ProjectPlanning"), btn => btn.SetImage(Resources.软件规划, true))
                .NewButton("关于", false, btn => btn.Tag = ("AboutShow"), btn => btn.SetImage(Resources.关于, true));

            addinService.RegisterCmd<VideoTestCmd>("VideoTest");
            addinService.RegisterCmd<SlantedImageTestCmd>("SlantedImageTest");
            addinService.RegisterCmd<AddEarthModelCmd>("AddEarthModel");
            addinService.RegisterCmd<LoadModelFromDirectoryCmd>("LoadModelFromDirectory");
            addinService.RegisterCmd<AddStateSetManipulatorCmd>("AddStateSetManipulator");
            addinService.RegisterCmd<AddStatsHandlerCmd>("AddStatsHandler");
            addinService.RegisterCmd<ContourMapTestCmd>();
            addinService.RegisterCmd<OpenEarthFileCmd>();
            addinService.RegisterCmd<OpenEarthFormCmd>();

            ribbonControl.Pages.Move(0, ribbonControl.Pages.Count - 1);
        }

//         public static void OnShowTreeListPopupMenu(PopupMenu treeListPopupMenu, TreeListNode treeNode)
//         {
//             if (treeNode.GetDisplayText(0) == "模型")
//             {
//                 treeListPopupMenu.NewButton("添加项目", false, btn => btn.Tag = ("ProjectAdd"), btn => btn.SetImage(Resources.项目添加, false));
//             }
// 
//             if (treeNode.Tag is UserProject)
//             {
//                 treeListPopupMenu
//                     .NewButton("设置当前项目", false, btn => btn.Tag = (new CmdInfo("SetUserProject", treeNode.Tag)))
//                     .NewButton("编辑项目", false, btn => btn.Tag = (new CmdInfo("ProjectEdit", treeNode.Tag)), btn => btn.SetImage(Resources.项目编辑, false))
//                     .NewButton("删除项目", false, btn => btn.Tag = (new CmdInfo("ProjectDelete", treeNode.Tag)), btn => btn.SetImage(Resources.项目删除, false))
//                     .NewButton("添加分组", false, btn => btn.Tag = (new CmdInfo("GroupAdd", treeNode.Tag)), btn => btn.SetImage(Resources.分组添加, false));
//                 treeListPopupMenu.ItemLinks.GetBarItemLink("添加分组").BeginGroup = true;
//             }
// 
//             if (treeNode.Tag is UserGroup)
//             {
//                 treeListPopupMenu
//                     .NewButton("设置当前组", false, btn => btn.Tag = (new CmdInfo("SetUserGroup", treeNode.Tag)))
//                     .NewButton("编辑分组", false, btn => btn.Tag = (new CmdInfo("GroupEdit", treeNode.Tag)), btn => btn.SetImage(Resources.分组编辑, false))
//                     .NewButton("删除分组", false, btn => btn.Tag = (new CmdInfo("GroupDelete", treeNode.Tag)), btn => btn.SetImage(Resources.分组删除, false))
//                     .NewButton("添加模型", false, btn => btn.Tag = (new CmdInfo("GroupModeAdd", treeNode.Tag)), btn => btn.SetImage(Resources.模型添加, false));
//                 treeListPopupMenu.ItemLinks.GetBarItemLink("添加模型").BeginGroup = true;
//             }
// 
//             if (treeNode.Tag is UserModel)
//             {
//                 treeListPopupMenu
//                     .NewButton("显示", false, btn => btn.Tag = (new CmdInfo("GroupModelShow", treeNode.Tag)))
//                     .NewButton("定位", false, btn => btn.Tag = (new CmdInfo("GroupModelLocation", treeNode.Tag)))
//                     .NewButton("编辑", false, btn => btn.Tag = (new CmdInfo("GroupModelEdit", treeNode.Tag)), btn => btn.SetImage(Resources.模型编辑, false))
//                     .NewButton("删除", false, btn => btn.Tag = (new CmdInfo("GroupModelDelete", treeNode.Tag)), btn => btn.SetImage(Resources.模型删除, false))
//                     .NewButton("移动", false, btn => btn.Tag = (new CmdInfo("GroupModelMove", treeNode.Tag)), btn => btn.SetImage(Resources.模型移动, false))
//                     .NewButton("旋转", false, btn => btn.Tag = (new CmdInfo("GroupModelRotate", treeNode.Tag)), btn => btn.SetImage(Resources.模型旋转, false));
//             }
//         }
    }
}
